package com.ruoyi.cms.controller.website;

import com.ruoyi.cms.domain.CmsDict;
import com.ruoyi.cms.service.ICmsDictService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "CmsLinkController", description = "系统友情链接管理 for web前端")
@RestController
@RequestMapping("cms/website/link")
public class CmsSiteLinkController extends BaseController {


    @Autowired
    private ICmsDictService cmsDictService;

    @Operation(summary = "查询友情链接列表")
    @GetMapping("/list")
    public AjaxResult list() {
        CmsDict cmsDict = new CmsDict();
        cmsDict.setDictType("link");
        List<CmsDict> list = cmsDictService.selectCmsDictList(cmsDict);
        return success(list);
    }

}
